1. Field of the Invention
The present invention relates generally to relational database systems where solid state drives (SSDs) are used as an extension of main memory bufferpools. The invention may enable storing database pages with different page sizes in the same SSD file. An exemplary embodiment of the invention adjusts the space allocated to different page types automatically so that the hit ratio is improved.
2. Description of the Related Art
Conventional database systems support multiple page sizes for storing data records. DB2 for instance supports 4K, 8K, 16K and 32K pages. A database administrator can create multiple tablespaces with different page sizes to store different database objects. For example, a tablespace with 4K page size can be created to keep the indexes and another tablespace with 16K page size to keep the actual data records. The main memory bufferpools, however, cannot cater for multiple tablespaces created with different page sizes. For instance, an 8K main memory bufferpool can be used for multiple tablespaces with 8K pages only. If a tablespace is created with 16K pages, then a dedicated bufferpool with 16K pages should be created for this tablespace.
On the other hand, many database vendors are working on supporting SSDs as an extension of main memory bufferpools. To cater for multiple page size main memory bufferpools, the SSD file can be divided into constant size segments each serving a different main memory bufferpool. However, this approach is not preferable since the activity on different bufferpools may change overtime and the SSD space could be underutilized. In addition, this would affect the hit ratio in a negative way due to the changes in the workload over time. Alternatively, one can use a page fragmentation approach where a single file is used by different page size bufferpools. In this approach, every page can be divided into 4K chunks and stored in available 4K slots on the file.